package com.example.ysdemo.rpc.client;

import com.dtflys.forest.annotation.DataObject;
import com.dtflys.forest.annotation.DataVariable;
import com.dtflys.forest.annotation.Request;
import com.example.ysdemo.po.ResultVo;
import com.example.ysdemo.rpc.req.AccessTokenReq;

public interface YsRpcClient {

    /**
     * getYsAccessToken
     *
     * ResultVo(code=200, msg=操作成功!, data={"expireTime":1614650802771,"accessToken":"at.8583g7973l163xp710icaogd21xh2pty-1lacqubkgj-0xvww2o-u1ukdbz1h"}, success=false, lang=null)
     *
     * @param accessTokenUrl String
     * @param accessTokenReq AccessTokenReq
     * @return ResultVo
     */
    @Request(
            type = "post",
            contentType = "application/x-www-form-urlencoded",
            url = "${0}")
    ResultVo getYsAccessToken(@DataVariable("accessTokenUrl") String accessTokenUrl,
                    @DataObject AccessTokenReq accessTokenReq );

}
